/*
* @Author: majingyu
* @Date:   2017-05-27 10:03:41
* @Last Modified by:   majingyu
* @Last Modified time: 2017-05-27 14:09:07
*/

import React from 'react';
import { connect } from 'react-redux';
import { getUserMessage } from 'action/user.js';
import 'css/myDetails.less';

class MyOrder extends React.Component{
    constructor(props){
        super(props);
    }
    render(){
        let user = this.props.user.user?this.props.user.user:'';
        return(
            <div className="content">
                <div className="headImg block-info">
                    <div className="head-block">
                        <span className="text">头像：</span>
                        <img src="/image/header.jpg" alt="头像" className="head-img"/>
                    </div>
                </div>
                <div className="message block-info">
                    <div className="block-mess">
                        <span className="text">昵称：</span>
                        <span className="detail-message">{user.name}</span>
                    </div>
                    <div className=" block-mess">
                        <span className="text">年龄：</span>
                        <span className="detail-message">{user.age}</span>
                    </div>
                    <div className=" block-mess">
                        <span className="text">性别：</span>
                        <span className="detail-message">{user.sex}</span>
                    </div>
                    {/*<div className=" block-mess">
                                            <span className="text">角色：</span>
                                            <span className="detail-message">{user.user.role}</span>
                                        </div>*/}
                </div>
            </div>
        );
    }

}
const myDetailData = (state) => {
    return {
        user:state.user
    }
}
let visibileMyOrder = connect(myDetailData)(MyOrder);
export default visibileMyOrder;